package com.hc.oa.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * pm_task_member:
 */
@Entity
@Table(name = "pm_task_member")
public class PmTaskMember implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * user_id:
	 */
	private String userId;

	/**
	 * percent_assigned:
	 */
	private float percentAssigned;

	/**
	 * description:
	 */
	private String description;

	/**
	 * pj_tasks:
	 */
	private PjTasks pjTasks;

	public PmTaskMember() {
		super();
	}

	public PmTaskMember(String userId, float percentAssigned,
			String description, PjTasks pjTasks) {
		super();
		this.userId = userId;
		this.percentAssigned = percentAssigned;
		this.description = description;
		this.pjTasks = pjTasks;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Id
	@Column(name = "user_id", length = 18, nullable = false)
	public String getUserId() {
		return userId;
	}

	public void setPercentAssigned(float percentAssigned) {
		this.percentAssigned = percentAssigned;
	}

	@Column(name = "percent_assigned")
	public float getPercentAssigned() {
		return percentAssigned;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "description", length = 80)
	public String getDescription() {
		return description;
	}

	public void setPjTasks(PjTasks pjTasks) {
		this.pjTasks = pjTasks;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "task_id", nullable = false)
	public PjTasks getPjTasks() {
		return pjTasks;
	}

	public String toString() {
		return "PmTaskMember [userId=" + userId + ",percentAssigned="
				+ percentAssigned + ",description=" + description + ",pjTasks="
				+ pjTasks + "]";
	}

}
